package org.teremail.message;


public class SimpleEntity implements ContentEntity {
    
    private final ContentHeaders header;
    private final Content content;
    private final String id;

    public SimpleEntity(String id, ContentHeaders header, Content content) {
        this.id = id;
        this.header = header;
        this.content = content;
    }
    
    public SimpleEntity(ContentHeaders header, Content content) {
        this(Entity.UNSAVED_ID, header, content);
    }
    
    public String getId() {
        return id;
    }

    public ContentHeaders getContentHeader() {
        return header;
    }

    public Content getContent() {
        return content;
    }

    public void accept(EntityVisitor v) {
        v.visitSimpleEntity(this);
    }

    public EntityType getType() {
        return EntityType.SIMPLE_ENTITY;
    }

}
